<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .father{
            margin-top: 40px;
              height: 50px;
              overflow: hidden;
               display: flex;
            align-items: center;
            transition: 1s;
        }
        .child{
            position: absolute;
            height: 50px;
            transition: all 0.5s;
            /*position: absolute;*/
            /*-moz-transition:2s;	!* Firefox 4 *!*/
            /*-webkit-transition:2s;	!* Safari 和 Chrome *!*/
            /*-o-transition:2s;	!* Opera *!*/
        }
        .child:nth-child(1){
            width: 88px;
            top: 0;
        }
        .child:nth-child(1) img{
            width: 88px;
        }
        .child:nth-child(2){
            top: 50px;
        }
        .child:nth-child(2) img{
            width: 50px;
        }
        .father:hover .child:nth-child(1){
            top: -50px;
        }
        .father:hover .child:nth-child(2){
            top: 0px;
        }
        .ftu{
             display: flex;
            flex-direction: column;
            width: 88px;
            /*overflow: hidden;*/
            height: 50px;
            position: relative;
            transition: all 1s;
        }
        .father:hover .ftu{
            width: 50px;
        }
        *{
            margin: 0;
            padding: 0;
        }
        .menu{
            margin-left: 40px;
        }
    </style>
</head>
<body>
<div class="father">
    <div class="ftu">
    <div class="child"><img src="./img/5f36aa42e831bca87820c64afcb391e3.jpg"></div>
    <div class="child"><img src="./img/1.jpeg"></div>
    </div>
    <div class="menu">123456</div>
</div>
</body>
</html>